﻿
using System;
namespace Mrkz.ImageManipulation.FrequencyFiltering
{  
    public class FFTEngine
    {
        public FFTEngine()
        {
        }

        public TImage<ComplexPixel> ForwardTransform(TImage<Pixel> Source)
        {
            TImage<ComplexPixel> i = ImageFactory<Pixel>.FromImage(Source);

            TImage<ComplexPixel> r = FFTEngineSupportFunctions.FFT2D(i, 1);

            return r;
        }

        public TImage<Pixel> InverseTransform(TImage<ComplexPixel> Source)
        {
            TImage<ComplexPixel> r = null;

            r = FFTEngineSupportFunctions.FFT2D(Source, -1);

            return ImageConverter<Pixel,ComplexPixel>.FromImageWithCrop(r);
        }

    }   
}
